<style scoped>
        .expand-row{
            margin-bottom: 16px;
        }
    </style>
    <template>
        <div>
            <Table :columns="columns10" :data="row.children"></Table>
        </div>
    </template>
<script>
    export default {
        props: {
            row: Object
        },
        data () {
            return {
                columns10: [
                    {
                        title: 'Action',
                        key: 'action',
                        align: 'center',
                        render: (h, params) => {
                            return h('div', [
                                h('Button', {
                                    props: {
                                        type: 'text',
                                        size: 'small'
                                    },
                                    style: {
                                        marginRight: '5px'
                                    },
                                    on: {
                                        click: () => {
                                            this.show(params.index);
                                        }
                                    }
                                }, '编辑'),
                                h('Button', {
                                    props: {
                                        type: 'text',
                                        size: 'small'
                                    },
                                    on: {
                                        click: () => {
                                            let ids = [params.row.id];
                                            depot.post({
                                                url: 'data/area/deleteArea?isDel=1',
                                                data: ids,
                                                cb: (data) => {
                                                    if (data.code === 0) {
                                                        this.$Message.success('删除成功');
                                                        setTimeout(() => {
                                                            location.reload();
                                                        }, 500);
                                                    } else {
                                                        this.$Message.error(data.message);
                                                    }
                                                }
                                            });
                                        }
                                    }
                                }, '删除')
                            ]);
                        }
                    },
                    {
                        title: '名称',
                        key: 'name'
                    },
                    {
                        title: '是否启用',
                        key: 'isActive',
                        render: (h, params) => {
                            return h('div', [
                                h('span', params.row.isActive === true ? '启用' : '禁用')
                            ]);
                        }
                    }
                ]
            };
        }
    };
</script>